<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${book['bookName']}+' - 图书详情 - '+${infoMap['title']}"></title>
    <div data-th-replace="layout/head"></div>
</head>
<body>
    <div data-th-replace="layout/common-hade-one"></div>
    <input hidden id="bookId" th:value="${book['id']}">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="/">首页</a></li>
            <li><a th:href="@{/web/book/list}">图书列表</a></li>
            <li class="active" th:text="${book['bookName']}"></li>
        </ol>
    </div>
    <div class="mb20 pb10 mt10">
        <div class="container">
            <section class="media">
                <div class="media-left">
                    <aside class="book-big-img__wrap">
                        <img th:src="${book['imageMap']['pcUrlMap']['large']}" width="227" height="340" th:alt="${book['bookName']}">
                    </aside>
                </div>
                <div class="media-body">
                    <section class="ml10 b-l-item-info">
                        <dl class="clearfix">
                            <dt class="bb-name hLh30  ml5 pl10 mb10">
                                <span class="fs20 c-333 unFw" th:text="${book['bookName']}"></span>
                            </dt>
                            <dd class="pl10 ml5 mb20">
                                <section class="cm-desc-txt__twoLine">
                                </section>
                            </dd>
                            <dd class="bb-price pull-left col-sm-6">
                                <div class="dt pull-left c-999">售 　价：</div>
                                <div class="dd pull-left">
                                    <strong class="c-primary" th:if="${book['realPrice']}<=0">免费</strong>
                                    <strong class="c-danger" th:if="${book['realPrice']}>0" th:text="${book['realPrice']}"></strong>
                                    <span class="c-999 ml5 fs12" th:if="${selaSwitch}==3">(会员价：<samp th:text="${book['memberPrice']}>0? '￥'+${book['memberPrice']}:'免费'"></samp>)</span>
                                    <span class="c-999 ml5 fs12" th:if="${selaSwitch} !=3 and ${book['realPrice']}!=0 and ${book['realPrice']} != ${book['rawPrice']} and ${book['rawPrice']} != ${book['memberPrice']}">(<samp th:text="${#numbers.formatDecimal(book['realPrice']/book['rawPrice']*10,1,1,'POINT')}"></samp>折)</span>
                                </div>
                            </dd>
                            <dd class="bb-market  pull-left col-sm-6">
                                <div class="dt pull-left c-999">定　价：</div>
                                <div class="dd pull-left"><del class="c-999" th:text="'￥'+${book['rawPrice']}"></del></div>
                            </dd>
                        </dl>
                        <ul class="summary c-999 fs12 ml5 pl10">
                            <li><span class="dt">作　　者：</span> <span class="dd" th:text="${book['author']}"> </span></li>
                            <li><span class="dt">出 版 社：</span> <span class="dd" th:text="${book['bookPress']}"></span></li>
                            <li><span class="dt">出版时间：</span> <span class="dd" th:text="${#strings.substring(book['publishTime'],0,10)}"></span></li>
                            <li>
                                <span class="dt">分　　类：</span>
                                <span class="dd">
                                    <samp th:each="subject : ${book['subjectList']}" th:utext="${subject['subjectName']}+'&nbsp;'"></samp>
                                </span>
                            </li>
                            <li>
                                <span class="dt">购买数量：</span>
                                <span class="dd">
                                        <small class="btn-group btn-group-sm form-inline">
                                            <button class="btn btn-white" type="button" data-minus><i class="fa fa-minus"></i></button>
                                            <input type="text" class="form-control text-center pull-left book-num-inp" value="1" data-stock>
                                            <button class="btn btn-white" type="button" data-plus><i class="fa fa-plus"></i></button>
                                        </small>
                                    </span>
                                <span class="dt ml20">库存数量：</span>
                                <span class="dd">
                                    <small class="c-danger fs16" th:attrappend="data-stock=${book['stockNum']}" th:text="${book['stockNum']}"></small>
                                    <input type="hidden" id="stockNum" th:value="${book['stockNum']}">
                                </span>
                            </li>
                        </ul>
                        <div class="mt20 clearfix">
                            <aside class="pull-right mt10" data-share>
                                <a href="javascript:void(0)" class="c-999 oShareBtn"><i class="fa fa-share mr5"></i> 分享</a>
                            </aside>
                            <div class="btn-group cm-buy-group">
                                <button type="button" class="btn btn-lg btn-w-m btn-danger" data-buy>立即购买</button>
                                <a id="book-online-consultation" th:attrappend="data-book=${serviceMap['context']}">
                                    <button type="button" class="btn btn-lg btn-w-m btn-warning">在线咨询</button>
                                </a>
                            </div>
                        </div>
                    </section>
                </div>
            </section>
            <div class="mb20 pb10 mt20 pt10">
                <div class="row">
                    <div class="col-sm-12">
                        <section class="c-info-tab">
                            <h4 data-tab="depict" class="active"><span class="fs16 c-333">图书简介</span></h4>
                            <h4 data-tab="contents"><span class="fs16 c-333">图书目录</span></h4>
                        </section>
                        <article class="mt20 pt10">
                            <section data-tab="depict" th:utext="${book['depict']}">
                            </section>
                            <section data-tab="contents" class="hide" th:utext="${book['contents']}">
                            </section>
                        </article>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div data-th-replace="layout/footer"></div>
    <script type="text/javascript" th:src="@{{path}/front/web/business/course/book/book-info.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/front/web/common/shareFn.js?v={v}(path=${staticPath}, v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/common/qrcode/qrcode.min.js?v={v}(path=${staticPath}, v=${v})}"></script>
</body>
</html>